package com.sysman.HttpTools;

import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;

/** 
* @author  LTT-AH-ZY
* @date 创建时间：2017年11月23日 下午1:39:56 
* @version 1.0 
* @parameter 参数及其意义
* @since 最早使用该方法/类/接口的JDK版本 
* @since  
* @return  
*/

public class DataAnalyzeDetails {
	/**
	 * 医生端详情数据，对接收的json数据进行解析，非list
	 * @param jsonobject
	 * @return
	 */
	public static Map<String, Object> DoctorJsonToDetails(JSONObject jsonobject){
			Map<String,Object> map = new HashMap<>();
			map.put("docloginpix", jsonobject.get("docloginpix").toString());//医生登陆头像
			map.put("doclogintime", jsonobject.get("doclogintime").toString());//医生上次登陆时间
			map.put("docloginid", jsonobject.get("docloginid").toString());//医生登陆id
        	map.put("docname", jsonobject.get("docname").toString());//医生姓名
        	map.put("docmale", jsonobject.get("docmale").toString());//医生性别
        	map.put("docage", jsonobject.get("docage").toString());//医生年龄
        	map.put("doctitle", jsonobject.get("doctitle").toString());//医生职称
        	map.put("docloginphone", jsonobject.get("docloginphone").toString());//医生登陆手机号
        	map.put("docprimarydept", jsonobject.get("docprimarydept").toString());//医生所在第一科室
        	map.put("docseconddept", jsonobject.get("docseconddept").toString());//医生所在第二科室
        	map.put("docallday", jsonobject.get("docallday").toString());//医生是否全天接诊
        	map.put("dochosplon", jsonobject.get("dochosplon").toString());//医生所在经度
        	map.put("dochosplat", jsonobject.get("dochosplat").toString());//医生所在纬度
        	map.put("doccardnum", jsonobject.get("doccardnum").toString());//医生注册身份证号
        	map.put("dochospprovince", jsonobject.get("dochospprovince").toString());//医生所在省
        	map.put("dochospcity", jsonobject.get("dochospcity").toString());//医生所在市
        	map.put("dochosparea", jsonobject.get("dochosparea").toString());//医生所在区
        	map.put("dochospother", jsonobject.get("dochospother").toString());//医生所在路
        	map.put("dochosp", jsonobject.get("dochosp").toString());//医生所在医院
        	map.put("hosplevel", jsonobject.get("hosplevel").toString());//医生所在医院等级
        	map.put("doclogintype", jsonobject.get("doclogintype").toString());//医生登陆账户审核状态码
        	map.put("doclogintypename", jsonobject.get("doclogintypename").toString());//医生登陆账户审核状态字
        	map.put("dochuanxinaccount", jsonobject.get("dochuanxinaccount").toString());//医生环信账号
        	
        	//String[] doctitlephoto=jsonobject.get("doctitlephoto").toString().split(",");
        	map.put("doctitlephoto", jsonobject.get("doctitlephoto").toString().split(","));//职称执业医师资格证照片
        	
        	map.put("docworkcardphoto", jsonobject.get("docworkcardphoto").toString().split(","));//工牌照片
        	map.put("doccardphoto", jsonobject.get("doccardphoto").toString().split(","));//医生身份证照片
        	map.put("docotherphoto", jsonobject.get("docotherphoto").toString().split(","));//医生其他照片
        	map.put("docqualphoto", jsonobject.get("docqualphoto").toString().split(","));//行医资格证照片
		return map;
	}
	/**
	 * 医院端详情数据，对接收的json数据进行解析，非list
	 * @param jsonobject
	 * @return
	 */
	public static Map<String,Object> HospitalJsonToDetails(JSONObject jsonobject){
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("hosploginpix", jsonobject.get("hosploginpix").toString());//医院登陆头像
		map.put("hosploginid", jsonobject.get("hosploginid").toString());//医院登陆id
		map.put("hosploginphone", jsonobject.get("hosploginphone").toString());//医院登陆手机号
		map.put("hosplogintime", jsonobject.get("hosplogintime").toString());//医院上次登录时间
		map.put("hosplevelname", jsonobject.get("hosplevelname").toString());//医院等级名称
		map.put("hospname", jsonobject.get("hospname").toString());//医院联系电话
		map.put("hospphone", jsonobject.get("hospphone").toString());//医院联系电话
		map.put("hospadrprovince", jsonobject.get("hospadrprovince").toString());//医院所在省
		map.put("hospadrcity", jsonobject.get("hospadrcity").toString());//医院所在市
		map.put("hospadrarea", jsonobject.get("hospadrarea").toString());//医院所在区
		map.put("hospadrother", jsonobject.get("hospadrother").toString());//医院所在路
		map.put("hosphuanxinaccount", jsonobject.get("hosphuanxinaccount").toString());//医院环信账号
		map.put("hosplogintype", jsonobject.get("hosplogintype").toString());//医院账号状态字
		map.put("hosplogintypename", jsonobject.get("hosplogintypename").toString());//医院账号状态名
		map.put("hospfeature", jsonobject.get("hospfeature").toString());//医院特色介绍
		map.put("hospabs", jsonobject.get("hospabs").toString());//医院简介
		map.put("hospregidcard", jsonobject.get("hospregidcard").toString());//医院注册身份证号码
		
		map.put("hosppraclicense", jsonobject.get("hosppraclicense").toString().split(","));//
		map.put("hospregdocquacer", jsonobject.get("hospregdocquacer").toString().split(","));//
		map.put("hosplegalcer", jsonobject.get("hosplegalcer").toString().split(","));//
		map.put("hosporgcodecer", jsonobject.get("hosporgcodecer").toString().split(","));//
		return map;
	}
	public static Map<String,Object> PatientJsonToDetails(JSONObject jsonobject){
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("userloginpix", jsonobject.get("userloginpix").toString());//病人登陆头像
		map.put("username", jsonobject.get("username").toString());//
		map.put("userage", jsonobject.get("userage").toString());//
		map.put("usermale", jsonobject.get("usermale").toString());//
		map.put("userloginphone", jsonobject.get("userloginphone").toString());//
		map.put("userlogintime", jsonobject.get("userlogintime").toString());//
		map.put("usercardnum", jsonobject.get("usercardnum").toString());//
		map.put("userlogintype", jsonobject.get("userlogintype").toString());//
		map.put("userlogintypename", jsonobject.get("userlogintypename").toString());//
		map.put("usercardphoto", jsonobject.get("usercardphoto").toString().split(","));//
		map.put("useradrprovince", jsonobject.get("useradrprovince").toString());//
		map.put("useradrcity", jsonobject.get("useradrcity").toString());//
		map.put("useradrarea", jsonobject.get("useradrarea").toString());//
		map.put("useradrother", jsonobject.get("useradrother").toString());//
		return map;
	}
}
